package com.gang.mars.redisson.Thread;
/**
 * MIX 1
 * MAX 10
 * */
public class Apple09Priority{

    public static void main(String[] args) {

        System.out.println(Thread.currentThread().getName() + " --> " + Thread.currentThread().getPriority());

        CustomizePriority customizePriority = new CustomizePriority();


        Thread thread1 = new Thread(customizePriority,"01");

        Thread thread2 = new Thread(customizePriority,"02");

        Thread thread3 = new Thread(customizePriority,"03");

        thread1.start();

        thread2.setPriority(1);
        thread2.start();

        thread3.setPriority(10);
        thread3.start();
    }


    static class CustomizePriority implements Runnable{

        @Override
        public void run() {
            System.out.println(Thread.currentThread().getName() + " --> " + Thread.currentThread().getPriority());

        }
    }
}
